<HTML>
<BODY bgcolor="#ffffff" text="#000000">
<A NAME = "Proc194"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">fn_diagramobjects&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * FUNCTION: fn_diagramobjects </TT><BR><TT> */</TT><BR><TT></TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp CREATE FUNCTION fn_diagramobjects() </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp RETURNS int</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WITH EXECUTE AS N'dbo'</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp AS</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp declare @id_upgraddiagrams&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp declare @id_sysdiagrams&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp declare @id_helpdiagrams&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp declare @id_helpdiagramdefinition&nbsp&nbsp&nbsp&nbsp&nbsp int</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp declare @id_creatediagram&nbsp&nbsp&nbsp&nbsp&nbsp int</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp declare @id_renamediagram&nbsp&nbsp&nbsp&nbsp&nbsp int</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp declare @id_alterdiagram&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp declare @id_dropdiagram&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp declare @InstalledObjects&nbsp&nbsp&nbsp&nbsp&nbsp int</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp select @InstalledObjects = 0</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp select&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @id_upgraddiagrams = object_id(N'dbo.sp_upgraddiagrams'),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @id_sysdiagrams = object_id(N'dbo.sysdiagrams'),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @id_helpdiagrams = object_id(N'dbo.sp_helpdiagrams'),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @id_helpdiagramdefinition = object_id(N'dbo.sp_helpdiagramdefinition'),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @id_creatediagram = object_id(N'dbo.sp_creatediagram'),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @id_renamediagram = object_id(N'dbo.sp_renamediagram'),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @id_alterdiagram = object_id(N'dbo.sp_alterdiagram'), </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @id_dropdiagram = object_id(N'dbo.sp_dropdiagram')</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp if @id_upgraddiagrams is not null</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp select @InstalledObjects = @InstalledObjects + 1</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp if @id_sysdiagrams is not null</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp select @InstalledObjects = @InstalledObjects + 2</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp if @id_helpdiagrams is not null</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp select @InstalledObjects = @InstalledObjects + 4</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp if @id_helpdiagramdefinition is not null</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp select @InstalledObjects = @InstalledObjects + 8</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp if @id_creatediagram is not null</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp select @InstalledObjects = @InstalledObjects + 16</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp if @id_renamediagram is not null</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp select @InstalledObjects = @InstalledObjects + 32</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp if @id_alterdiagram&nbsp&nbsp is not null</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp select @InstalledObjects = @InstalledObjects + 64</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp if @id_dropdiagram is not null</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp select @InstalledObjects = @InstalledObjects + 128</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp return @InstalledObjects </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">fn_diagramobjects Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">fn_diagramobjects Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
</BODY>
</HTML>
